package org.crazyit.activiti_d3._1_GetService;

import org.activiti.engine.*;

public class GetService {

    public static void main(String[] args) {

        //1. 读取流程引擎配置
        ProcessEngineConfiguration config= ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("service.xml");

        //2. 创建流程引擎
        ProcessEngine engine = config.buildProcessEngine();

        //3. 得到各个业务组件实例
        RepositoryService repositoryService = engine.getRepositoryService();
        RuntimeService runtimeService = engine.getRuntimeService();
        TaskService taskService = engine.getTaskService();
        IdentityService identityService = engine.getIdentityService();
        ManagementService managementService = engine.getManagementService();
        HistoryService historyService = engine.getHistoryService();
        DynamicBpmnService dynamicBpmnService = engine.getDynamicBpmnService();

        //4. 输出类名
        System.out.println(repositoryService.getClass().getName());
        System.out.println(runtimeService.getClass().getName());
        System.out.println(taskService.getClass().getName());
        System.out.println(identityService.getClass().getName());
        System.out.println(managementService.getClass().getName());
        System.out.println(historyService.getClass().getName());
        System.out.println(dynamicBpmnService.getClass().getName());


    }

}
